﻿@model PortalWeb.Areas.Admin.Models.EditFunctionViewModel
@{
    Layout = null;
    ViewBag.Title = "编辑 功能入口";
}
@using (Ajax.BeginForm("Edit", "Function", new AjaxOptions
{
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "OnSuccess"
}, new { @class = "form-horizontal", role = "form" }))
{
    @Html.HiddenFor(m => m.Id)
    @Html.HiddenFor(m => m.ParentId)
    @Html.AntiForgeryToken()
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 id="myModalLabel" class="modal-title">@ViewBag.Title</h4>
        </div>
        <div class="modal-body">
            @Html.ValidationSummary("", new {@class = "text-danger"})
            <div class="form-group">
                @Html.LabelFor(m => m.ParentId, new { @class = "col-md-2 control-label" })
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.ParentId, new { @class = "form-control" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Type, new { @class = "col-md-2 control-label" })
                <div class="col-md-10">
                    @Html.DropDownListFor(m => m.Type, Model.Type.ToSelectList(), new { @class = "form-control" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.FunctionName, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.FunctionName, new {@class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Icon, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.Icon, new {@class = "form-control"})
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.IsShow, new { @class = "col-md-2 control-label" })
                <div class="col-md-10">
                    @Html.CheckBoxFor(m => m.IsShow)
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.ActionUrl, new {@class = "col-md-2 control-label"})
                <div class="col-md-10">
                    @Html.TextBoxFor(m => m.ActionUrl, new {@class = "form-control"})
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button type="submit" class="btn btn-primary">确定</button>
            <button class="btn  btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
        </div>
    </div>
}
